css: Remove _gtk_css_style_property_is_specified_type()
authorBenjamin Otte <otte@redhat.com>
Mon, 26 Mar 2012 14:22:53 +0000 (16:22 +0200)
committerBenjamin Otte <otte@redhat.com>
Tue, 17 Apr 2012 06:59:11 +0000 (08:59 +0200)
That check is going to be refactored away.

gtk/gtkcssprovider.c
gtk/gtkcssstyleproperty.c
gtk/gtkcssstylepropertyprivate.h

index 022d408ebd4894320286855b8217397f2110c078..cbd14cddd078b809e81c860d4b3be56390e55e45 100644 (file)
@@ -1254,7 +1254,6 @@ gtk_css_ruleset_add (GtkCssRuleset       *ruleset,
 {
   guint i;
 
-  g_return_if_fail (_gtk_css_style_property_is_specified_type (property, G_VALUE_TYPE (value)));
   g_return_if_fail (ruleset->owns_styles || ruleset->n_styles == 0);
 
   if (ruleset->set_styles == NULL)
index 4e14cd4a0992ae9306f7c64d4b76b3b9b56d0398..35d21ca397c7af285703f22bfc84308defe22059 100644 (file)
@@ -464,32 +464,6 @@ _gtk_css_style_property_get_specified_type (GtkCssStyleProperty *property)
   return _gtk_css_value_get_content_type (property->initial_value);
 }
 
-gboolean
-_gtk_css_style_property_is_specified_type (GtkCssStyleProperty *property,
-                                           GType                type)
-{
-  g_return_val_if_fail (GTK_IS_CSS_STYLE_PROPERTY (property), FALSE);
-
-  /* If it's our specified type, of course it's valid */
-  if (type == _gtk_css_value_get_content_type (property->initial_value))
-    return TRUE;
-
-  /* The special values 'inherit' and 'initial' are always valid */
-  if (type == GTK_TYPE_CSS_SPECIAL_VALUE)
-    return TRUE;
-
-  /* XXX: Someone needs to fix that legacy */
-  if ((_gtk_css_value_holds (property->initial_value, GDK_TYPE_RGBA) ||
-       _gtk_css_value_holds (property->initial_value, GDK_TYPE_COLOR)) &&
-      type == GTK_TYPE_SYMBOLIC_COLOR)
-    return TRUE;
-  if (_gtk_css_value_holds (property->initial_value, CAIRO_GOBJECT_TYPE_PATTERN) &&
-      type == GTK_TYPE_GRADIENT)
-    return TRUE;
-
-  return FALSE;
-}
-
 /**
  * _gtk_css_style_property_compute_value:
  * @property: the property
index 391f418fd365222a0a9508c4dc81ed514dda41b3..a10297b559cee4ac847c420e567599ff4bf0a704 100644 (file)
@@ -82,8 +82,6 @@ GtkCssValue  *          _gtk_css_style_property_get_initial_value
                                                                 (GtkCssStyleProperty    *property);
 GType                   _gtk_css_style_property_get_computed_type (GtkCssStyleProperty *property);
 GType                   _gtk_css_style_property_get_specified_type (GtkCssStyleProperty *property);
-gboolean                _gtk_css_style_property_is_specified_type (GtkCssStyleProperty  *property,
-                                                                 GType                   type);
 
 GtkCssValue *           _gtk_css_style_property_compute_value   (GtkCssStyleProperty    *property,
                                                                  GtkStyleContext        *context,